from django.db import models
from filebrowser.fields import FileBrowseField
from datetime import datetime, timedelta
from django.contrib.auth.models import User
from django.db.models.query import QuerySet

class Essay(models.Model):
	title = models.CharField(max_length=50, help_text='Title of Essay you wish to be displayed')
	description = models.TextField()
	creation_date = models.DateTimeField(default=datetime.now())
	pdf = FileBrowseField(max_length=200, initial_directory="/doc/", extensions_allowed=['.pdf', '.doc', '.docx'], blank=True, null=True)
	def __unicode__(self):
		return self.title
